package a.j;

import java.awt.*;
import java.awt.geom.GeneralPath;

public class t
  extends n
  implements md.l_
{
  public static final String f = "y.view.ShadowNodePainter.SHADOW_PAINTING";
  private double g = 3.0D;
  private boolean h = true;
  private Color i = bd.c;
  public static int j;
  
  protected void a(ld paramld, Graphics2D paramGraphics2D, boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramBoolean)
      {
        if (bool) {
          break label34;
        }
        k(paramld, paramGraphics2D);
      }
    }
    else if (!ld.D) {
      return;
    }
    label34:
    l(paramld, paramGraphics2D);
  }
  
  private void k(ld paramld, Graphics2D paramGraphics2D)
  {
    Rectangle2D.Double localDouble = paramld.O();
    if (!ld.E) {
      if (g(paramld, paramGraphics2D)) {
        paramGraphics2D.fillRect((int)localDouble.getX(), (int)localDouble.getY(), (int)localDouble.getWidth(), (int)localDouble.getHeight());
      }
    }
    if (f(paramld, paramGraphics2D)) {
      paramGraphics2D.drawRect((int)localDouble.getX(), (int)localDouble.getY(), (int)localDouble.getWidth(), (int)localDouble.getHeight());
    }
  }
  
  private void l(ld paramld, Graphics2D paramGraphics2D)
  {
    m(paramld, paramGraphics2D);
    n(paramld, paramGraphics2D);
    o(paramld, paramGraphics2D);
    p(paramld, paramGraphics2D);
  }
  
  protected void m(ld paramld, Graphics2D paramGraphics2D)
  {
    if (bd.a(paramld, paramGraphics2D, b(paramld)))
    {
      bd localbd = hb.a().p;
      localbd.a(d(paramld));
      localbd.a(c(paramld));
      localbd.a(paramGraphics2D, paramld.a(), paramld.b(), paramld.c(), paramld.d());
    }
  }
  
  protected void n(ld paramld, Graphics2D paramGraphics2D)
  {
    Color localColor1 = paramGraphics2D.getColor();
    boolean bool = j(paramld, paramGraphics2D);
    Color localColor2 = d(paramld, bool);
    if (!ld.E)
    {
      if (localColor2 != null)
      {
        paramGraphics2D.setColor(localColor2);
        paramGraphics2D.fill(e(paramld));
      }
      paramGraphics2D.setColor(localColor1);
    }
  }
  
  protected void o(ld paramld, Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    Stroke localStroke1 = paramGraphics2D.getStroke();
    Color localColor1 = paramGraphics2D.getColor();
    boolean bool1 = j(paramld, paramGraphics2D);
    Color localColor2 = a(paramld, bool1);
    if (!bool2)
    {
      if (localColor2 != null)
      {
        Stroke localStroke2 = b(paramld, bool1);
        if (bool2) {
          return;
        }
        if (localStroke2 != null)
        {
          paramGraphics2D.setColor(localColor2);
          paramGraphics2D.setStroke(localStroke2);
          paramGraphics2D.draw(e(paramld));
        }
      }
      paramGraphics2D.setStroke(localStroke1);
      paramGraphics2D.setColor(localColor1);
    }
  }
  
  protected void p(ld paramld, Graphics2D paramGraphics2D)
  {
    Paint localPaint = paramGraphics2D.getPaint();
    if (!ld.E)
    {
      if (q(paramld, paramGraphics2D))
      {
        float[] arrayOfFloat = a(paramld);
        float f1 = (float)paramld.a();
        float f2 = (float)paramld.b();
        float f3 = arrayOfFloat[0];
        float f4 = arrayOfFloat[1];
        float f5 = arrayOfFloat[2];
        float f6 = arrayOfFloat[3];
        GeneralPath localGeneralPath = new GeneralPath();
        localGeneralPath.moveTo(f1 + f5 - f6, f2 + f5);
        localGeneralPath.quadTo(f1 + f5 - f6, f2 + f5 - f6, f1 + f5, f2 + f5 - f6);
        localGeneralPath.lineTo(f1 + f3 - f5, f2 + f5 - f6);
        localGeneralPath.quadTo(f1 + f3 - f5 + f6, f2 + f5 - f6, f1 + f3 - f5 + f6, f2 + f5);
        localGeneralPath.quadTo(f1 + f3 - f5 + f6, f2 + f5 + f6, f1 + f3 * 0.5F + f6, f2 + f4 * 0.5F + f6);
        localGeneralPath.quadTo(f1 + f5 + f6, f2 + f4 - f5 + f6, f1 + f5, f2 + f4 - f5 + f6);
        localGeneralPath.quadTo(f1 + f5 - f6, f2 + f4 - f5 + f6, f1 + f5 - f6, f2 + f4 - f5);
        localGeneralPath.closePath();
        paramGraphics2D.fill(localGeneralPath);
      }
      paramGraphics2D.setPaint(localPaint);
    }
  }
  
  protected boolean q(ld paramld, Graphics2D paramGraphics2D)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (!paramld.s())
      {
        Paint localPaint = r(paramld, paramGraphics2D);
        if (!bool)
        {
          if (localPaint != null) {
            paramGraphics2D.setPaint(localPaint);
          }
        }
        else {
          return true;
        }
        return false;
      }
    }
    return false;
  }
  
  protected Paint r(ld paramld, Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    float[] arrayOfFloat = a(paramld);
    float f1 = arrayOfFloat[3];
    float f2 = arrayOfFloat[0] - f1 - f1;
    float f3 = arrayOfFloat[1] - f1 - f1;
    float f4 = f2 * f2 + f3 * f3;
    Color localColor1 = f(paramld, j(paramld, paramGraphics2D));
    if (!bool2) {
      if (localColor1 != null)
      {
        localColor2 = new Color(localColor1.getRed(), localColor1.getGreen(), localColor1.getBlue(), 220);
        localColor3 = new Color(localColor1.getRed(), localColor1.getGreen(), localColor1.getBlue(), 32);
        if (bool2) {
          break label186;
        }
        if (!bool1) {
          break label182;
        }
      }
    }
    Color localColor2 = new Color(255, 255, 255, 220);
    Color localColor3 = new Color(255, 255, 255, 32);
    label182:
    label186:
    Object localObject;
    if (c(paramGraphics2D))
    {
      float f5 = (float)paramld.a();
      float f6 = (float)paramld.b();
      localObject = new GradientPaint(f5, f6, localColor2, f5 + f3 * f3 / f4 * arrayOfFloat[0], f6 + f2 * f2 / f4 * arrayOfFloat[1], localColor3);
      if (!bool1) {}
    }
    else
    {
      localObject = localColor3;
    }
    return localObject;
  }
  
  private float[] a(ld paramld)
  {
    double d1 = c(paramld);
    double d2 = paramld.c();
    double d3 = paramld.d();
    float f1 = (float)Math.min(d2, Math.max(0.65D * d2, d1 * 2.0D));
    float f2 = (float)Math.min(d3, Math.max(0.8D * d3, d1 * 2.0D));
    float f3 = (float)Math.min(d1, Math.min(f1 * 0.5D, f2 * 0.5D));
    float f4 = (float)Math.min(f3 * 0.75D, Math.min(f1 * 0.4D, f2 * 0.4D));
    return new float[] { f1, f2, f3, f4 };
  }
  
  protected boolean b(ld paramld)
  {
    return a();
  }
  
  public boolean a()
  {
    return this.h;
  }
  
  public void a(boolean paramBoolean)
  {
    this.h = paramBoolean;
  }
  
  protected double c(ld paramld)
  {
    return b();
  }
  
  public double b()
  {
    return this.g;
  }
  
  public void a(double paramDouble)
  {
    this.g = paramDouble;
  }
  
  protected Color d(ld paramld)
  {
    return c();
  }
  
  public Color c()
  {
    return this.i;
  }
  
  public void b(Color paramColor)
  {
    this.i = paramColor;
  }
  
  public boolean a(ld paramld, double paramDouble1, double paramDouble2)
  {
    return e(paramld).contains(paramDouble1, paramDouble2);
  }
  
  private RoundRectangle2D.Double e(ld paramld)
  {
    double d = c(paramld);
    return new RoundRectangle2D.Double(paramld.a(), paramld.b(), paramld.c(), paramld.d(), d, d);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.t

 * JD-Core Version:    0.7.0.1

 */